package com.cn.type;

/**
 * Boolean类型
 * @author sushy
 * @date 2016-3-23 
 */
public class TypeBoolean implements ITypeConverter {

	public Object getValue(String text) {
		try {
			Boolean ret = Boolean.valueOf(text);
			if (ret != null) {
				return ret;
			}
		} catch (Throwable t) {
		}
		return false;
	}

	public String getText(Object value) {
		if (value == null) {
			return null;
		}
		return value.toString();
	}

}
